//
//  UserHeaderView.m
//  Four_Fit_New
//
//  Created by lanou on 16/7/16.
//  Copyright © 2016年 xmaz. All rights reserved.
//

#import "UserHeaderView.h"
#import "UserDetailedModel.h"

@interface UserHeaderView ()
@property (weak, nonatomic) IBOutlet UIImageView *pic;
@property (weak, nonatomic) IBOutlet UILabel *notecount;
@property (weak, nonatomic) IBOutlet UILabel *followcount;
@property (weak, nonatomic) IBOutlet UILabel *fanscount;
@property (weak, nonatomic) IBOutlet UILabel *cityname;
@property (weak, nonatomic) IBOutlet UILabel *sex;
@property (weak, nonatomic) IBOutlet UILabel *age;
@property (weak, nonatomic) IBOutlet UILabel *height;
@property (weak, nonatomic) IBOutlet UILabel *declaration;
@property (weak, nonatomic) IBOutlet UIImageView *backgroundImage;


@end

@implementation UserHeaderView

+ (instancetype)userHeaderView {
    
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}

- (void)setModel:(UserDetailedModel *)model {
    
    [self.pic sd_setImageWithURL:[NSURL URLWithString:model.pic]];
    self.notecount.text = [NSString stringWithFormat:@"%@",model.notecount];
    self.followcount.text = [NSString stringWithFormat:@"%@",model.followcount];
    self.fanscount.text = [NSString stringWithFormat:@"%@",model.fanscount];
    self.cityname.text = model.cityname;
    self.sex.text = model.sex;
    self.age.text = [NSString stringWithFormat:@"%@岁",model.age];
    self.height.text = [NSString stringWithFormat:@"%@cm",model.height];
    self.declaration.text = model.declaration;
    
    
}

- (void)awakeFromNib {
    
    self.pic.layer.cornerRadius = self.pic.width * 0.5;
    self.pic.layer.masksToBounds = YES;
    
}



@end
